import express from 'express'
import { countSql, detailSql, getResult, listSql, onDuplicByFiled, putSql } from '../../../util/operateSql.js';
import { getAccount } from '../../../middleWare/user/index.js';

var router = express.Router();
const table1 = 'activity_master.t_spu'

router.get('/getProductTotal', getAccount,async (req, res, next) => {
	const {id:merchant_id}  = req.master
	const sql = countSql(table1,{merchant_id})
	const countRow = await getResult(sql) 
	res.json(req.app.locals.success(countRow[0]))
})


export default router